{{!-- <template>
{{#if page.psSysPFPlugin}}
    {{> @macro/plugins/view/view-use.hbs appPlugin=page.psSysPFPlugin}}
{{else}}
    {{#if page.psViewLayoutPanel.useDefaultLayout}}
    <AppViewLayout :class="classNames">
        <template v-if="!noViewCaption && model.showCaption" #viewHeaderLeft>
            <div class="view-header__left__caption">
                {{> @macro/view/view-caption.hbs}}
            </div>
        </template>
        {{#each page.ctrls as | ctrl |}}
        {{#eq ctrl.controlType 'TOOLBAR'}}
        <template #viewHeaderRight>
            <div class="view-header__right__toolbar">
                {{> @macro/widgets/toolbar/toolbar.hbs page=page ctrl=ctrl}}
            </div>
        </template>
        {{/eq}}
        {{/each}}
        <template #default>
            <component
                v-if="store.activeForm.codeName"
                :name="store.activeForm.name"
                :is="`${store.activeForm.codeName}Form`"
                :actions="store.activeForm.actions"
                :context="store.context"
                :viewParams="store.viewParams"
                :closeView="store.closeView"
                :pLoadingHelper="store.loadingHelper"
                :openView="store.openView"
                :newView="store.newView"
                @ctrl-init="(name:string, ability:any) => { handleCtrlInit(controller, name, ability) }"
                @ctrl-action="(name:string, action:any, data:any) => { handleCtrlAction(controller, name, action, data) }"
                @ctrl-destroy="(name:string, data:any) => { handleCtrlDestroy(controller, name, data) }">
            </component>
        </template>
        <template #viewFooter>
            <div class="view-footer__buttons">
                <AppButton type="primary" @click="handleConfirm">
                    \{{$t('app.common.confirm', '确认')}}
                </AppButton>
                <AppButton @click="handleCancel">
                    \{{$t('app.common.cancel', '取消')}}
                </AppButton>
            </div>
        </template>
    </AppViewLayout>
    {{else}}
    <div :class="classNames">
        {{#if page.psViewLayoutPanel.rootPSPanelItems}}
        {{#each page.psViewLayoutPanel.rootPSPanelItems as | panelItem |}}
        {{> @macro/widgets/panel-detail/include-panel.hbs type=panelItem.itemType item=panelItem isMultiData=false panel=page.psViewLayoutPanel page=page}}
        {{/each}}
        {{/if}}
    </div>
    {{/if}}
{{/if}}
</template>
<script lang="ts" setup>
// 基于template/src/views/\{{appModules}}/\{{pages@DEWFDYNAACTIONVIEW}}/\{{spinalCase page.codeName}}.vue.hbs生成
{{#if page.psViewLayoutPanel.useDefaultLayout}}
import { AppViewLayout } from "@components/layout/view-layout";
{{> @macro/widgets/ctrl/import-ctrl.hbs ctrls=page.ctrls}}
{{else}}
import { AppCtrlPos, AppScrollContainer, AppSimpleFlexContainer, AppStandardContainer, AppTabPanel, AppTabPage } from '@components/layout-element/structure';
{{#if page.psViewLayoutPanel.viewProxyMode}}
{{> @macro/widgets/ctrl/import-ctrl.hbs ctrls=page.psViewLayoutPanel.psControls}}
{{else}}
{{> @macro/widgets/ctrl/import-ctrl.hbs ctrls=page.ctrls}}
{{/if}}
{{/if}}
import { model } from "./{{spinalCase page.codeName}}-model";
import { 
    useNavParamsBind, 
    useEventBind, 
    handleToolbarItemClick,
    handleOptViewButtonAction, 
    handleCtrlAction, 
    handleCtrlInit, 
    handleCtrlDestroy, 
    getViewClassNames,
{{#unless page.psViewLayoutPanel.useDefaultLayout}}
    handleComponentAction,
{{/unless}}
} from "@/hooks/use-view";
import { IContext, WFDynaActionViewActionType, IParam, IWFDynaActionViewAbility, IWFDynaActionViewControllerParams, IWFDynaActionViewStore, WFDynaActionViewController, IWFDynaActionViewController, ILoadingHelper, IEvent } from '@/core';
{{> @macro/view/view-props.hbs}}

{{> @macro/common/emit.hbs name="view" actionType="WFDynaActionViewActionType" ability="IWFDynaActionViewAbility"}}

const classNames = computed(() => {
    return getViewClassNames(model, props);
});

const params: IWFDynaActionViewControllerParams<WFDynaActionViewActionType, IWFDynaActionViewAbility> = { 
    name: props.name,
    model, 
    evt, 
    openType: props.openType, 
    pLoadingHelper: props.pLoadingHelper,
    isLoadDefault: props.isLoadDefault,
    handler: (data: IWFDynaActionViewStore) => { return reactive(data)} 
};

{{> @macro/common/controller.hbs name="view" IController="IWFDynaActionViewController" store="IWFDynaActionViewStore" ability="IWFDynaActionViewAbility" controller="WFDynaActionViewController"}}

const handleConfirm = () => {
    controller.confirm();
}

const handleCancel = () => {
    controller.cancel();
}
</script> --}}
